package com.booway.demo;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import org.junit.Test;

/**
 * 
 * @author jsb-hujie
 * 
 * 2020年7月31日
 *
 */
public class DemoLock
{
	@Test
	public void testLock()
	{
		Lock lock = new ReentrantLock();
		
		try 
		{
			lock.lock();
			
			System.out.println("------------>");
		} finally 
		{
			lock.unlock();
		}
	}
}
